package square;


import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Test;

import dungeon.Level;
import dungeon.Position;

public class TeleportationSquareTest {

	private static TeleportationSquare tSquare1;
	private static TeleportationSquare tSquare2;
	
	@Before
	public void setUp() throws Exception {
		tSquare1 = new NormalSquare();
		tSquare2 = new NormalSquare();
	}
	
	@Test
	public void Teleport_LegalCase(){
		Level<TeleportationSquare> l = new Level<TeleportationSquare> (4,4,0);
		Position pos1 = new Position(2,3,0);
		Position pos2 = new Position(1,1,0);
		l.addSquare(pos1, tSquare1);
		l.addSquare(pos2, tSquare2);
		tSquare1.addTeleportationDestination(tSquare2);
		tSquare2.addTeleportationDestination(tSquare1);
		assertTrue(tSquare2.canTeleportTo(tSquare1));
		assertTrue(tSquare1.canTeleportTo(tSquare2));
	}



}
